//sistema de hints
local hint_table = {}

function WBHint( msg )
	local texto = msg:ReadString()
	local tempo = msg:ReadFloat()
	
	table.insert(hint_table,texto)
	timer.Create("hint_remover"..tostring(math.Rand(0,1000))..texto, tempo, 1, function()
		if table.getn(hint_table) > 0 then
			table.remove(hint_table,1)
		end
	end
	)
end
usermessage.Hook("wbhint", WBHint)
//sistema de hints


function DrawHint()
	//hints
	if table.getn(hint_table) > 7 then
		table.remove(hint_table,1)
	end
	if table.getn(hint_table) > 0 then
		for C=1,#hint_table do
			draw.RoundedBox( 2, ScrW()-10-string.len(hint_table[C])*6.3, (ScrH()/2) - (C-1)*30, string.len(hint_table[C])*6.3, 26, Color( 0, 0, 0, math.sin(CurTime()*6)*50 + 100 ) )
			draw.SimpleTextOutlined( hint_table[C] , "DefaultBold", ScrW()-10-string.len(hint_table[C])*3.23, (ScrH()/2) - (C-1)*30 + 13, Color(255,255,255,255), 1, 1, 1, Color(0,0,0,255) )
		end
	end
end
hook.Add("HUDPaint", "DrawWarballsHints", DrawHint)